<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("userPwoer", request.getSession().getAttribute("userPwoer"));
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title id="title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/DDMBase.js"></script>



<link rel="stylesheet"
	href="${path }/resource/weixin/css/house-class.css">
</head>
<body>
	<!-- 头部 -->
	<jsp:include page="_top.jsp"></jsp:include>
	<!-- 内容 -->
	<!-- 导航 -->
	<div class="nav color-9">
		<span><a href="${path }/index" class="color-9">首页</a></span>&nbsp;&gt;&nbsp;<span>选择类目</span>
	</div>
	<!-- title -->
	<div class="title font-s2 font-w6 back-w">
		<i class="am-icon-home color-y am-icon-sm margin-10 "></i>房产
	</div>
		<form class="form-horizontal" id="dataform"
			onsubmit="javascripr:return false;">
			<select onchange="changeSelect(this)" datatype="*"
				class="form-control autoFull house-select padding-1 margin-1" name="fyKinds" data-filed="name"
				data-value="name"
				data-url="${path}/visitor/dataDictionary/showDataDictionary"
				data-param="{type:'房源类型'}">
				<option value=''>--请选房源类型--</option>
			</select> 
			<select datatype="*" id="gq" class="form-control house-select2 padding-1 margin-1" size="1"
				name="fyGq">
			</select> 
			<div class="submit-div">
			<a href="javascript:;" onclick="myForm.submit()"
				class="btn btn-success radius back-y color-w padding-1 margin-1 ">开始发布</a>
			</div>
		</form>

	

</body>
	<script type="text/javascript">
	MTools.autoFullSelect();
	var myForm = MForm.initForm({
		invokeUrl : "${path}/customer/fy/addForm2",
		isAutoClose : false,
		afterSubmit : function(loj) {
			MTools.redirect("${path}/customer/redirect/" + loj.getValue("page"));
		},
	});

	function changeSelect(node) {
		var nvalue = $(node).val();
		if (nvalue == '') {
			return;
		}
		var cz = "<option value='出租' >出租</option>";
		var qz = "<option value='求租' >求租</option>";
		var cs = "<option value='出售' >出售</option>";
		var qg = "<option value='求购' >求购</option>";
		var zr = "<option value='转让' >转让</option>";
		var html = '';
		if (nvalue == '二手房') {
			html = cs + qg;
		} else if (nvalue == '写字楼') {
			html = cs + cz + qz + qg;
		} else if (nvalue == '出租房') {
			html = cz + qz;
		} else if (nvalue == '商铺') {
			html = cz + qz + cs + qg + zr;
		} else if (nvalue == '厂房') {
			html = cz + qz + cs + qg + zr;
		}
		$("#gq").html(html);
	}
</script>

</html>